package cn.kai.controller;


import cn.kai.base.JsonResult;
import cn.kai.service.ComfyuiWorkflowMenuService;
import cn.kai.vo.AiConfigVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 工作流顶层菜单类目 前端控制器
 * </p>
 *
 * @author autoCode
 * @since 2025-02-13 04:44:43
 */
@RestController
@RequestMapping("/api/v1/config")
@Api(tags = "ai配置控制类")
@RequiredArgsConstructor
public class ComfyuiWorkflowMenuController {
    private final ComfyuiWorkflowMenuService menuService;

    @GetMapping("/get/menu/config")
    @ApiOperation("获取菜单配置")
    public JsonResult<AiConfigVO> getMenuConfig(){
        return JsonResult.buildSuccess(menuService.getMenuConfig());
    }
}

